<!--多选组 TODO -->
<template >
    <el-switch
            v-model="value"
            :id="id"
            :name="name"
            :bindProp="bindProp"
            :style="style"
            :class="cls"
            :placeholder="placeholder"
            @change="_controlOnUpdate"

            :active-color="activeColor"
            :inactive-color="inactiveColor"
            :active-text="activeText"
            :inactive-text="inactiveText">
    </el-switch>
</template>

<script>
    exports = {
        templateType:'vue',
        data: function () {
            return {
                id:'',
                name:'',
                bindProp:'',
                value: '',
                style:'',
                cls:'',
                placeholder:'',
                activeColor:'',
                inactiveColor:'',
                activeText:'',
                inactiveText:''
            }
        },
        mounted:function(){
        },
        methods:{
            _controlOnUpdate:function(v,ov){
                var key = this.bindProp;
                this.onUpdate&&this.onUpdate(key,v,ov); //外部构造的方法调用
            }
        }
    }
</script>

<style>

</style>